/*
 * DAOAbstractFactory.java
 *
 * Created on 3 de Julho de 2007, 11:22
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package br.unifor.finance.business.persistence;

import br.unifor.finance.common.business.entity.TipoDespesa;
import br.unifor.finance.business.persistence.GenericJPADAOFactory;
import br.unifor.finance.common.dto.PersistentObject;
import br.unifor.finance.persistence.dao.GenericDAO;
import java.io.Serializable;

/**
 *
 * @author Cleilson
 */
public abstract class DAOAbstractFactory {
  
  private static DAOAbstractFactory instance;
  
  /**
   * Creates a new instance of DAOAbstractFactory
   */
  protected DAOAbstractFactory() {
  }
  
  public synchronized static DAOAbstractFactory getInstance() {
    if (instance == null)
      instance = new GenericJPADAOFactory();
    return instance;
  }
  
  public abstract <E extends PersistentObject, K extends Serializable> GenericDAO<E, K> getGenericDAO();

  public abstract GenericDAO<TipoDespesa, Integer> getTipoDespesaDAO();
  
}
